package com.easychat.entity;

import com.easychat.enums.UserContactTypeEnum;

import java.io.Serializable;

/**
 * (ChatSessionUser)实体类
 *
 * @author makejava
 * @since 2024-10-19 22:24:56
 */
public class ChatSessionUser implements Serializable {
    private static final long serialVersionUID = -17605326934227309L;
/**
     * 用户ID
     */
    private String userId;
/**
     * 联系人ID
     */
    private String contactId;
/**
     * 会话ID
     */
    private String sessionId;
/**
     * 联系人名称
     */
    private String contactName;
    public String lastMessage;
    public Long lastReceiveTime;
    private Integer memberCount;
    private Integer contactType;

    public Integer getContactType() {
        return UserContactTypeEnum.getByPrefix(contactId).getType();
    }

    public void setContactType(Integer contactType) {
        this.contactType = contactType;
    }

    public Integer getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(Integer memberCount) {
        this.memberCount = memberCount;
    }

    public String getLastMessage() {
        return lastMessage;
    }

    public void setLastMessage(String lastMessage) {
        this.lastMessage = lastMessage;
    }

    public Long getLastReceiveTime() {
        return lastReceiveTime;
    }

    public void setLastReceiveTime(Long lastReceiveTime) {
        this.lastReceiveTime = lastReceiveTime;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getContactId() {
        return contactId;
    }

    public void setContactId(String contactId) {
        this.contactId = contactId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

}

